﻿using System.Collections.Generic;
using eCommerce.db.DALRespository;
using eCommerce.db.DataRespository;

namespace eCommerce.db.BORespository
{
    public class CustomerBo
    {
        public static List<CustomerEntity> SearchBuyAndSell(string keyword, int storeId, bool isExactly, bool isAdministrator, int pageIndex, int pageSize, ref int totalRecords)
        {
            return CustomerDal.SearchBuyAndSell(keyword, storeId, isExactly, isAdministrator, pageIndex, pageSize, ref totalRecords);
        }

        public static List<CustomerEntity> Search(string keyword, int storeId, int status, int orderBy, int pageIndex, int pageSize, ref int totalRecords)
        {
            return CustomerDal.Search(keyword, storeId, status, orderBy, pageIndex, pageSize, ref totalRecords);
        }

        public static CustomerEntity GetById(int id)
        {
            return CustomerDal.GetById(id);
        }

        public static CustomerEntity GetByMobile(string mobile)
        {
            return CustomerDal.GetByMobile(mobile);
        }

        public static void ChangeStatus(int id, int isActive)
        {
            CustomerDal.ChangeStatus(id, isActive);
        }

        public static int Save(CustomerEntity o)
        {
            return CustomerDal.Save(o);
        }

        public static void Delete(int id)
        {
            CustomerDal.Delete(id);
        }
    }
}
